package JavaCode;

import java.util.Scanner;

/**
 * @Author Kechelle
 * @Date 2020/9/12 22:58
 * @Version 1.0
 */
public class Test5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        System.out.println(Test5.function(a,b));
    }

    public static int function(int a, int b){
        String resA = Integer.toBinaryString(a);
        String resB = Integer.toBinaryString(b);
        int lenA = resA.length();
        int lenB = resB.length();
        StringBuffer sb = new StringBuffer();
        if (lenA<lenB){
            for (int i=0;i<lenB-lenA;i++){
                sb.append('0').append(resA);
                resA = sb.toString();
                lenA++;
            }
        }else {
            for (int i=0;i<lenA-lenB;i++){
                sb.append('0').append(resB);
                resB = sb.toString();
                lenB++;
            }
        }
        int count=0;
        for (int i=0;i<lenA;i++){
            if (resA.charAt(i)!=resB.charAt(i)) count++;
        }
        return count;
    }
}
